using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


namespace WindowsApplication4
{
    public partial class Form1 : Form
    {

        public Form1()
        {
            InitializeComponent();




        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox4_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            /*
            Village VillageA = new Village(Convert.ToInt32(txtVOx.Text), Convert.ToInt32(txtVOy.Text));
            Village VillageB = new Village(Convert.ToInt32(txtVDx.Text), Convert.ToInt32(txtVDy.Text));

            Distance distance= VillageA.DistanceTo(VillageB);

            string s="";
            TimeSpan time;
            foreach (Unit unit in Worlds.currentWorld.Units)
            {
                time = distance.TravelTime(unit);
                s += unit.name + " - " + time.Hours + ":" + time.Minutes + ":" + time.Seconds + "\n";
            }

            lblDuration.Text = s;
            */
        }

//        private void button2_Click(object sender, EventArgs e)
//        {
//            StreamReader objReader;
//            string strContents ;

//            objReader = new StreamReader(@"D:\data\855720322\My Documents\Personal\w3tribe.txt");


//            string line;
//            string[] splitLine;
//            while ((line = objReader.ReadLine()) != null)
//            {
////                listBox1.Items.Add(line);
//                splitLine = line.Split(',');
//                splitLine[1] = System.Web.HttpUtility.UrlDecode(splitLine[1]);

//                dtPlayers.Rows.Add(splitLine);

//            }
//            dtPlayers.Rows.Add(new object[] {0,"",0,0,0,0});

//            objReader.Close();




//            objReader = new StreamReader(@"D:\data\855720322\My Documents\Personal\w3villages.txt");

 
//            while ((line = objReader.ReadLine()) != null)
//            {
/////                listBox1.Items.Add(line);
//                splitLine = line.Split(',');
//                splitLine[1] = System.Web.HttpUtility.UrlDecode(splitLine[1]);

//                dtVillages.Rows.Add(splitLine);

//            }

//            objReader.Close();

//            worldData = new DataSet();
//            worldData.Tables.Add(dtPlayers);
//            worldData.Tables.Add(dtVillages);
//            //worldData.Relations.Add(dtPlayers.Columns[0], dtVillages.Columns[5]);


//            //dataGrid.DataSource = worldData;
//            //dataGrid.DataMember = "Villages";

//            worldData.WriteXml(@"D:\data\855720322\My Documents\Personal\w3.xml", XmlWriteMode.WriteSchema);

//        }

        private void button3_Click(object sender, EventArgs e)
        {

        }

        private void diagnosticsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Diagnostics frm = new Diagnostics();
            frm.Show();

        }

        private void mapToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {
  
        }
    }
}